/*******************************************************************************
 * Copyright (c) 2007 University of Oslo.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     University of Oslo - initial API and implementation
 *******************************************************************************/

package com.cea.papyrus.diagram.sequence.sedi.edit.policy;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.requests.DirectEditRequest;

import com.cea.papyrus.diagram.sequence.sedi.edit.handlers.InteractionUseRenameHandler;


/**
 * Edit policy to handle direct edit of the name of InteractionUses.
 * These are different from normal NamedElements because they edit the
 * name of the referred to interaction rather than the name of the
 * InteractionUse model element itself.
 * 
 * <p>The policy requires the figure to implement ILabeledFigure.</p>
 * 
 * @author frankd
 */
public class InteractionUseDirectEditPolicy extends LabelDirectEditPolicy {
	@Override
	protected Command getDirectEditCommand(DirectEditRequest request) {
		return new InteractionUseRenameHandler(this).getRenameCommand(request);
	}
}
